package com.wg.dome.repository;


import com.wg.dome.attribute.Attribute;
import com.wg.dome.attribute.AttributeType;
import com.wg.dome.entity.config.ZhuLingWeaponEntity;
import com.wg.db.cache.AbstractUniqueCacheRepository;

public class ZhuLingWeaponRepository extends AbstractUniqueCacheRepository<ZhuLingWeaponEntity> {
    public ZhuLingWeaponRepository() {
        super(ZhuLingWeaponEntity.class);
    }

    public void getAttribute(int zlLv, Attribute attribute){
        ZhuLingWeaponEntity entity = get(zlLv);
        if (entity == null){
            return;
        }

        attribute.set(AttributeType.ATK, entity.getAtk());
        attribute.set(AttributeType.KBL, entity.getKbl());
    }

}
